Modify kbc group nv pdf importer to support#4294
Modify kbc group nv pdf importer to support#4294Nirus2000 merged 4 commits intoportfolio-performance:masterfrom Nirus2000:Modify-KBC-Group-NV-PDF-Importer-to-support
Conversation
Change Java 17 to Java 21
|
Hey @buchen Single currency:
Multiple currency:
Thats what i want
also, if i write ... with.... ExtractorMatchers.java like |
|
Hey @Nirus2000, I am not sure what to look at. The error message from the log
is correct, isn't it? The gross value does not match the calculated gross value so that transaction is not consistent. 69,606.12 + 72.80 (taxes) + 46.63 (fees) is a gross value of 69.725,55 which does not fit to the configured gross value of $60665.50. That is off by some 9000. About
where do I find the failure? |
|
HeyHo @buchen The problem is that it is displayed via: |
Looking at the debug output of this test case "03", the transaction is not created correctly. There is no calculation (or currency conversion) at this point in time, because all these values are stored with the transaction directly. |
|
I think base and term currency code are flipped in the importer (below the changed version). .section("fxGross", "baseCurrency", "exchangeRate", "termCurrency").optional() //
.match("^.* aan .* (?<fxGross>[\\.,\\d]+) (?<fxCurrency>[\\w]{3})$") //
.match("^[\\.,\\d]+ (?<baseCurrency>[\\w]{3}) = (?<exchangeRate>[\\.,\\d]+) (?<termCurrency>[\\w]{3})$") //
.assign((t, v) -> {
ExtrExchangeRate rate = asExchangeRate(v);
type.getCurrentContext().putType(rate);
Money fxGross = Money.of(asCurrencyCode(v.get("fxCurrency")), asAmount(v.get("fxGross")));
Money gross = rate.convert(t.getAccountTransaction().getCurrencyCode(), fxGross);
checkAndSetGrossUnit(gross, fxGross, t, type.getCurrentContext());
}) |
Thx.. done 👍🏻 |
https://forum.portfolio-performance.info/t/pdf-import-from-kbc-bank-nv/22455/10
https://forum.portfolio-performance.info/t/pdf-import-from-kbc-bank-nv/22455/11